//
//  PALotteryTicketViewController.m
//  PAMobileWallet
//
//  Created by Pay_SMP002 on 13-7-3.
//  Copyright (c) 2013年 平安付. All rights reserved.
//

#import "PALotteryTicketViewController.h"
#import "PALotteryTicketView.h"
#import "Global.h"

#import "PANavView.h"
#import "PAPersonalViewController.h"
#import "PALoginViewController.h"

@interface PALotteryTicketViewController ()

@end

@implementation PALotteryTicketViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self)
    {
        lotteryTicketView = [[PALotteryTicketView alloc] initWithFrame:RECT_PHONE];
        lotteryTicketView.parentController = self;
        self.view = lotteryTicketView;
        
        navView = [[PANavView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 44)];
        navView.delegate = self;
        [navView setTitle:@"买彩票"];
        [lotteryTicketView addSubview:navView];
        
        if (!loginViewController)
        {
            loginViewController = [[PALoginViewController alloc] init];
        }
    }
    return self;
}

#pragma mark - PANavViewDelegate methods

- (void)sendSelf:(PANavView *)sendView
{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)testNext:(id)sender
{
    if (!personalViewController)
    {
        personalViewController = [[PAPersonalViewController alloc] initWithNibName:nil bundle:nil];
        personalViewController.parentController = self;
    }
    [personalViewController checkUpOrDown:@"down"];
    //[loginViewController loginAction:[NSDictionary dictionaryWithObjectsAndKeys:@"123", k_loginId,@"123",k_loginPassword,nil]];

    [self.navigationController pushViewController:personalViewController animated:YES];
}

- (void)viewDidLoad
{
    [super viewDidLoad];
}

- (void)viewWillAppear:(BOOL)animated
{
    [self.navigationController setNavigationBarHidden:YES animated:NO];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
}

@end
